Skip to content

Feat/parallel downloads - #6

Merged
Ryu1845 merged 2 commits into
mainfrom
feat/parallel-downloads
Jul 15, 2026
Merged

Ryu1845 merged 2 commits into
mainfrom
feat/parallel-downloads

Conversation

@Ryu1845

@Ryu1845 Ryu1845 commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Ryu1845 and others added 2 commits July 15, 2026 10:12
Models came down a single curl HTTPS stream, which Hugging Face's LFS CDN
throttles per-connection — the reason hf_transfer exists. Fetch large files
over N concurrent byte-range requests instead and stitch them back together:
measured ~2.16x on real HF (dac.gguf), and it fills fast links a single TCP
stream can't saturate.

One redirect-following HEAD resolves the exact Content-Length and the final
Xet CDN URL (which honors Range); [0,size) is split into N segments fetched
in parallel from that URL, concatenated in order, and the result is verified
against Content-Length. Anything unexpected — a segment error, a short read,
a server that ignores Range (returns 200) — fails the size check and falls
back to the existing single-stream resumable path, so correctness never
depends on the fast path. Tunable via ZONOS2_DL_CONNECTIONS (default 8,
max 16); files under 32 MB stay single-stream.

Implemented in all three download paths: the desktop app (src/app.cpp), and
the start-zonos2 .sh / .ps1 launchers. Tests: app-download-smoke.sh now
asserts the backbone takes the segmented path; new segment-download.sh
exercises the bash function in isolation (sourced via a ZONOS2_LIB_ONLY
guard) — reassembly, the 32 MB threshold, and the single-connection opt-out.
Both use new tests/range_server.py, a Range-capable static server (the stdlib
http.server ignores Range), and run in the linux-cpu / linux-app CI jobs.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Without this, softprops/action-gh-release publishes every tag as a normal
release, so a v0.5.0-rc1 dry-run shows up as "Latest". Gate prerelease on a
hyphen in the tag name so -rc/-beta tags stay prereleases and final vX.Y.Z
tags remain full releases.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Ryu1845
Ryu1845 merged commit 14cade7 into main Jul 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant